package com.rybbaby.tss.front.tssMemberCheckAttendance.service;


import com.rybbaby.tss.core.web.service.IBaseService;
import com.rybbaby.tss.front.tssMemberCheckAttendance.entity.TssMemberCheckAttendance;

import java.util.List;
import java.util.Map;

/**
 * @description 会员考勤记录表数据库操作服务接口
 * 
 * @author 雷春琼
 * 
 * @createDate 2017-08-10 上午10:33:46
 */
public interface ITssMemberCheckAttendanceService extends IBaseService<TssMemberCheckAttendance> {

    public String test(String abd);

    /**
     * 批量考勤
     * @param ids
     * @return
     */
    int batchAttendance(List<String> ids, String adminUserId);

    /**
     * 出勤人数
     * @param lessonsId
     * @param attendenceStatus
     * @return
     * @throws Exception
     */
    List<TssMemberCheckAttendance> attendanceNumber(String lessonsId,int attendenceStatus) throws Exception;
    /**
     * 总人数
     * @param lessonsId
     * @return
     * @throws Exception
     */
    List<TssMemberCheckAttendance> sumNumber(String lessonsId) throws Exception;

    /**
     * 更新班级考勤状态
     * @param lessonsId
     */
    void updateClassAttendance(String lessonsId)throws Exception;

    /**
     * 查询未考勤ids
     * @param lessonsIds
     *
     * @return
     */
    List<String> notAttendanceIds(List<String> lessonsIds)throws Exception;

    /**
     * 考勤
     * @param attendenceStatus
     * @param adminUserId
     * @param id
     * @return
     */
    int attendance(Integer attendenceStatus, String adminUserId, String id);

    int Remarks(String remark, String adminUserId, String id);

    /**
     * 查询考勤记录
     * @param ids
     * @return
     */
    List<TssMemberCheckAttendance> findHistory(List<String> ids) throws Exception;
    /**
     * 报班生成空白考勤记录
     * @param targetDataId
     * @param memberPackageId
     * @return
     */
    boolean saveEntity(String targetDataId, String memberPackageId) throws Exception ;

    /**
     * 首页考勤统计
     * @return
     */
    List<Map<String,Object>> findTodayAttendanceStatisticsByType(String adminUserIds);

    /**
     * 今日亲子/过渡考勤 班级列表
     * @return
     */
    List<Map<String,Object>> findClassAttendanceByType(String adminUserIds);

    /**
     * 查询要扣课时相关的信息
     * @return
     */
    Map<String, Object> findPackageInformation(String id);
    /**
     * 查询要扣课时相关的信息
     * @return
     */
    List<Map<String, Object>> findPackageInformationList(List<String> ids);

    /**
     * 查询考勤退课详情
     * @param attendanceId
     * @return
     */
    Map<String,Object> findAttendanceMaintenance(String attendanceId);

    /**
     * 更新考勤
     * @param
     */
    int updateCheckAttendance(String adminUserId, String remark, Integer attendenceStatus,String attendanceId);

    /**
     * 查询考勤退课信息
     * @param attendanceId
     * @return
     */
    Map<String,Object> findAttendanceMaintenancePackage(String attendanceId);

    /**
     * 查询班级考勤信息
     * @param lessonsId
     * @return
     */
    Map<String,Object> attendanceStatistics(String lessonsId);
}
